<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>圣杯布局实现</title>
  <style>
    * {
      padding: 0;
      margin: 0;
    }

    body {
      min-width: 800px;
    }

    .container {
      color: white;
      padding: 0 300px 0 300px;
    }

    .center,
    .left,
    .right {
      float: left;
      height: 400px;
    }

    .center {
      width: 100%;
      background-color: red;
    }

    .left {
      width: 300px;
      background-color: blue;
      margin-left: -100%;
      position: relative;
      left: -300px;
    }

    .right {
      width: 300px;
      background-color: greenyellow;
      margin-left: -300px;
      position: relative;
      right: -300px;
    }
  </style>
</head>

<body>
  <div class="container">
    <div class="center">
      centercentercentercentercentercentercentercentercentercentercentercentercentercentercentercentercentercentercentercentercentercentercentercenter
    </div>
    <div class="left">
      leftleftleftleftleftleftleftleftleftleftleftleftleftleftleftleftleftleftleftleftleftleftleftleftleftleftleftleftleftleftleftleftleftleftleft
    </div>
    <div class="right">
      rightrightrightrightrightrightrightrightrightrightrightrightrightrightrightrightrightrightrightrightrightrightrightrightrightrightrightrightrightright
    </div>
  </div>
</body>

</html>